//2009/08/01 21:27:19
#include <iostream>
#include <algorithm>

using namespace std;

class GuessTheNumber
{
public:
	int noGuesses(int upper, int answer)
	{
		int low = 1;
		int high = upper;
		int N =0;
		while(low <= high)
		{
			N++;
			int mid = (low + high) / 2;
			if(answer > mid)
				low = mid + 1;
			else if(answer == mid)
				return N;
			else 
				high = mid - 1; 
		}
		return -1;
	}
};
